package com.gzh.teaching.service.dto;

import com.gzh.core.dao.po.CommentEntity;
import com.gzh.core.util.StringUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

@Setter
@Getter
@ToString
public class CommentInfo {
  private String commentId;
  private String superCommentId;
  private String superName;
  private String userId;
  private String userName;
  private String content;
  private String createDate;
  private String createTime;
  private String likeCount;
  private String isLike;
  private String likeId;
  private String isMine;

  private List<CommentInfo> list;

  public CommentInfo(CommentEntity entity) {
    this.commentId = StringUtils.toString(entity.getCommentId());
    this.superCommentId = StringUtils.toString(entity.getSuperCommentId());
    this.userId = StringUtils.toString(entity.getUserId());
    this.content = entity.getContent();
    this.createDate = StringUtils.toString(entity.getCreateDate());
    this.createTime = StringUtils.toString(entity.getCreateTime());
    this.likeCount = StringUtils.toString(entity.getLikeCount());
  }
}
